package com.huawang.mdesign.model.service.request.propertymerge;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.huawang.core.definition.mof.instances.MetaClassInstance;
import com.huawang.mdesign.model.service.dto.propertymerge.PreviewValue;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.List;

/**
 * @auther lairenmao
 * @date 2025/4/17
 */
@Data
@SuperBuilder
@NoArgsConstructor
public class InstancePreviewValue extends PreviewValue {


    private List<String> givenTypes;

    @JsonIgnore
    private MetaClassInstance metaClassInstance;

    //属性模型id
    private String metaClassInstanceId;

    //合并的属性模型id
    private String mergedMetaClassInstanceId;

    //替换的属性模型id
    private String replaceMetaClassInstanceId;

    //属性模型的所有者
    private String ownerId;

    //标记当前模型是否是合并模型
    private Boolean isMerged = Boolean.FALSE;

    //标记当前模型是否需要copy一份到当前元素下面
    private Boolean needCopy = Boolean.FALSE;

    //标记当前是否需要用value的名称更新复制的模型名称
    private Boolean needUpdateName = Boolean.FALSE;

    private String typeId;

    private String typeName;

    @Schema(title = "图标")
    private String icon;

    private String value;


    @Schema(name = "多重性数值")
    private String multiplicity;

    @Override
    public Object getVal() {
        return value;
    }
}
